<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
    <th:block th:include="include :: header('修改耗材记录')" />
</head>
<body class="white-bg">
    <div class="wrapper wrapper-content animated fadeInRight ibox-content">
        <form class="form-horizontal m" id="form-consumables-edit" th:object="${consumables}">
            <input name="consumablesId" th:field="*{consumablesId}" type="hidden">
            <div class="form-group">    
                <label class="col-sm-3 control-label">耗材名称：</label>
                <div class="col-sm-8">
                    <input name="consumablesName" th:field="*{consumablesName}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">耗材数量：</label>
                <div class="col-sm-8">
                    <input name="consumablesCount" th:field="*{consumablesCount}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">耗材单位：</label>
                <div class="col-sm-8">
                    <input name="consumablesUnit" th:field="*{consumablesUnit}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">耗材规格：</label>
                <div class="col-sm-8">
                    <input name="consumablesSpecification" th:field="*{consumablesSpecification}" class="form-control" type="text">
                </div>
            </div>
        </form>
    </div>
    <th:block th:include="include :: footer" />
    <script th:inline="javascript">
        var prefix = ctx + "consumables/consumables";
        $("#form-consumables-edit").validate({
            focusCleanup: true
        });

        function submitHandler() {
            if ($.validate.form()) {
                $.operate.save(prefix + "/edit", $('#form-consumables-edit').serialize());
            }
        }
    </script>
</body>
</html>